﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="AssesmentPositionIDPForm.aspx.cs" Inherits="Assesment.Web.Forms.Transaction.AssesmentPositionIDPForm" %>

<asp:Content ID="Content1" ContentPlaceHolderID="body" runat="Server">
    <script src="<%= ResolveUrl("~/scripts/jquery.validate.min.js") %>" type="text/javascript"></script>
    <script src="<%= ResolveUrl("~/scripts/jquery.validate.wrapper.js") %>" type="text/javascript"></script>
    <script src="<%= ResolveUrl("~/scripts/jquery.inputmask.bundle.min.js") %>" type="text/javascript"></script>
    <script src="<%= ResolveUrl("~/scripts/jquery.msgBox.v1.js") %>" type="text/javascript"></script>
    <script src="<%= ResolveUrl("~/scripts/chosen/chosen.jquery.min.js") %>" type="text/javascript"></script>
    <link href="<%= ResolveUrl("~/styles/chosen/chosen.min.css") %>" rel="stylesheet"
        type="text/css" />
    <style type="text/css">
        table.gridtable
        {
            font-family: verdana,arial,sans-serif;
            font-size: 11px;
            color: #333333;
            border-width: 1px;
            border-color: #666666;
            border-collapse: collapse;
        }
        table.gridtable th
        {
            border-width: 1px;
            padding: 8px;
            border-style: solid;
            border-color: #666666;
            background-color: #dedede;
        }
        table.gridtable td
        {
            border-width: 1px;
            padding: 8px;
            border-style: solid;
            border-color: #666666;
            background-color: #ffffff;
        }
    </style>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#btnSave").button({ icons: { primary: "ui-icon-disk"} });
            $("#btnClose").button({ icons: { primary: "ui-icon-close"} });


            $('#btnClose').click(function () {
                var page = '<%= ResolveUrl("~/lists/Transaction/AssesmentPositionIDPList.aspx") %>' + '?menuId=' + '<%= base.MenuID %>';
                window.location.href = page;
            });

            $('#<%= ddlDepartemen.ClientID %>').chosen({ placeholder_text_single: "-- pilih departemen --" });
            $('#<%= ddlNIK.ClientID %>').chosen({ placeholder_text_single: "-- pilih NIK --" });
            $('#<%= ddlJabatanTujuan.ClientID %>').chosen({ placeholder_text_single: "-- pilih jabatan --" });


            $('#txtTglStartDate').datepicker({
                numberOfMonths: 1,
                showButtonPanel: true,
                changeMonth: true,
                changeYear: true,
                dateFormat: 'dd/mm/yy'
            });

            $('#txtTglEndDate').datepicker({
                numberOfMonths: 1,
                showButtonPanel: true,
                changeMonth: true,
                changeYear: true,
                dateFormat: 'dd/mm/yy'
            });


        });
 
    </script>
    <script language="javascript" type="text/javascript">

        $(document).ready(function () {

            var id = $('#<%= hfID.ClientID %>').val();

            if (id != "") {



                LoadKeyBehaviorEdit(id, 'tblKeyBehaviourCustomerFocus', 'tblKeyBehaviourCustomerFocusDevelopment', 'tblKeyBehaviourCustomerFocusMetode', 'tblKeyBehaviourCustomerFocusSuporting', 'tblKeyBehaviourCustomerFocusStartDate', 'tblKeyBehaviourCustomerFocusEndDate', 'CUSTOMER FOCUS', 'tblLevelCustomerFocus');

                LoadKeyBehaviorEdit(id, 'tblKeyBehaviourIntegrity', 'tblKeyBehaviourIntegrityDevelopment', 'tblKeyBehaviourIntegrityMetode', 'tblKeyBehaviourIntegritySuporting', 'tblKeyBehaviourIntegrityStartDate', 'tblKeyBehaviourIntegrityEndDate', 'INTEGRITY', 'tblLevelIntegrity');

                LoadKeyBehaviorEdit(id, 'tblKeyBehaviourTeamWork', 'tblKeyBehaviourTeamWorkDevelopment', 'tblKeyBehaviourTeamWorkMetode', 'tblKeyBehaviourTeamWorkSuporting', 'tblKeyBehaviourTeamWorkStartDate', 'tblKeyBehaviourTeamWorkEndDate', 'TEAM WORK', 'tblLevelTeamWork');

                LoadKeyBehaviorEdit(id, 'tblKeyBehaviourContinous', 'tblKeyBehaviourContinousDevelopment', 'tblKeyBehaviourContinousMetode', 'tblKeyBehaviourContinousSuporting', 'tblKeyBehaviourContinousStartDate', 'tblKeyBehaviourContinousEndDate', 'CONTINOUS', 'tblLevelContinous');

                LoadKeyBehaviorEdit(id, 'tblKeyBehaviourWorkExcellence', 'tblKeyBehaviourWorkExcellenceDevelopment', 'tblKeyBehaviourWorkExcellenceMetode', 'tblKeyBehaviourWorkExcellenceSuporting', 'tblKeyBehaviourWorkExcellenceStartDate', 'tblKeyBehaviourWorkExcellenceEndDate', 'WORK EXCELLENCE', 'tblLevelWorkExcellence');

                LoadKeyBehaviorEdit(id, 'tblKeyBehaviourFinancial', 'tblKeyBehaviourFinancialDevelopment', 'tblKeyBehaviourFinancialMetode', 'tblKeyBehaviourFinancialSuporting', 'tblKeyBehaviourFinancialStartDate', 'tblKeyBehaviourFinancialEndDate', 'FINANCIAL', 'tblLevelFinancial');

                LoadKeyBehaviorEdit(id, 'tblKeyBehaviourBussines', 'tblKeyBehaviourBussinesDevelopment', 'tblKeyBehaviourBussinesMetode', 'tblKeyBehaviourBussinesSuporting', 'tblKeyBehaviourBussinesStartDate', 'tblKeyBehaviourBussinesEndDate', 'BUILDING', 'tblLevelBussines');

                LoadKeyBehaviorEdit(id, 'tblKeyBehaviourLeadership', 'tblKeyBehaviourLeadershipDevelopment', 'tblKeyBehaviourLeadershipMetode', 'tblKeyBehaviourLeadershipSuporting', 'tblKeyBehaviourLeadershipStartDate', 'tblKeyBehaviourLeadershipEndDate', 'LEADERSHIP', 'tblLevelLeadership');

                LoadKeyBehaviorEdit(id, 'tblKeyBehaviourResource', 'tblKeyBehaviourResourceDevelopment', 'tblKeyBehaviourResourceMetode', 'tblKeyBehaviourResourceSuporting', 'tblKeyBehaviourResourceStartDate', 'tblKeyBehaviourResourceEndDate', 'RESOURCE', 'tblLevelResource');

            }

            $('#<%= ddlNIK.ClientID %>').change(function () {
                var handlerUrl = '<%= ResolveUrl("~/AjaxHandler/Loaddata/Transaction/AssesmentPositionLoad.ashx") %>';
                var AssesmentPositionID = $('#<%= ddlNIK.ClientID %> option:selected').val();
                RemoverTrTable();
                if (AssesmentPositionID != "") {
                    $.ajax({
                        type: 'POST',
                        url: handlerUrl + "?method=getbyidLoadData&AssesmentPositionID=" + AssesmentPositionID,
                        contentType: 'application/json',
                        dataType: 'json',
                        success: function (datas) {
                            $('#<%= txtNama.ClientID %>').val(datas.NamaKaryawan);
                            $('#<%= txtJabatan.ClientID %>').val(datas.Jabatan);
                            $('#<%= txtLokasiKerja.ClientID %>').val(datas.LokasiKerja);

                            $('#<%= txtTglAssesment.ClientID %>').val(datas.AssesmentDate);
                            $('#<%= txtDepartemen.ClientID %>').val(datas.Departemen);
                            $('#<%= txtJabatanTujuan.ClientID %>').val(datas.JabatanTujuan);
                            $('#<%= txtLokasi.ClientID %>').val(datas.Lokasi);


                            LoadKeyBehavior(datas.AssesmentPositionID, 'tblKeyBehaviourCustomerFocus', 'tblKeyBehaviourCustomerFocusDevelopment', 'tblKeyBehaviourCustomerFocusMetode', 'tblKeyBehaviourCustomerFocusSuporting', 'tblKeyBehaviourCustomerFocusStartDate', 'tblKeyBehaviourCustomerFocusEndDate', 'CUSTOMER FOCUS','tblLevelCustomerFocus');

                            LoadKeyBehavior(datas.AssesmentPositionID, 'tblKeyBehaviourIntegrity', 'tblKeyBehaviourIntegrityDevelopment', 'tblKeyBehaviourIntegrityMetode', 'tblKeyBehaviourIntegritySuporting', 'tblKeyBehaviourIntegrityStartDate', 'tblKeyBehaviourIntegrityEndDate', 'INTEGRITY','tblLevelIntegrity');

                            LoadKeyBehavior(datas.AssesmentPositionID, 'tblKeyBehaviourTeamWork', 'tblKeyBehaviourTeamWorkDevelopment', 'tblKeyBehaviourTeamWorkMetode', 'tblKeyBehaviourTeamWorkSuporting', 'tblKeyBehaviourTeamWorkStartDate', 'tblKeyBehaviourTeamWorkEndDate', 'TEAM WORK','tblLevelTeamWork');

                            LoadKeyBehavior(datas.AssesmentPositionID, 'tblKeyBehaviourContinous', 'tblKeyBehaviourContinousDevelopment', 'tblKeyBehaviourContinousMetode', 'tblKeyBehaviourContinousSuporting', 'tblKeyBehaviourContinousStartDate', 'tblKeyBehaviourContinousEndDate', 'CONTINOUS','tblLevelContinous');

                            LoadKeyBehavior(datas.AssesmentPositionID, 'tblKeyBehaviourWorkExcellence', 'tblKeyBehaviourWorkExcellenceDevelopment', 'tblKeyBehaviourWorkExcellenceMetode', 'tblKeyBehaviourWorkExcellenceSuporting', 'tblKeyBehaviourWorkExcellenceStartDate', 'tblKeyBehaviourWorkExcellenceEndDate', 'WORK EXCELLENCE','tblLevelWorkExcellence');

                            LoadKeyBehavior(datas.AssesmentPositionID, 'tblKeyBehaviourFinancial', 'tblKeyBehaviourFinancialDevelopment', 'tblKeyBehaviourFinancialMetode', 'tblKeyBehaviourFinancialSuporting', 'tblKeyBehaviourFinancialStartDate', 'tblKeyBehaviourFinancialEndDate', 'FINANCIAL','tblLevelFinancial');

                            LoadKeyBehavior(datas.AssesmentPositionID, 'tblKeyBehaviourBussines', 'tblKeyBehaviourBussinesDevelopment', 'tblKeyBehaviourBussinesMetode', 'tblKeyBehaviourBussinesSuporting', 'tblKeyBehaviourBussinesStartDate', 'tblKeyBehaviourBussinesEndDate', 'BUILDING','tblLevelBussines');

                            LoadKeyBehavior(datas.AssesmentPositionID, 'tblKeyBehaviourLeadership', 'tblKeyBehaviourLeadershipDevelopment', 'tblKeyBehaviourLeadershipMetode', 'tblKeyBehaviourLeadershipSuporting', 'tblKeyBehaviourLeadershipStartDate', 'tblKeyBehaviourLeadershipEndDate', 'LEADERSHIP','tblLevelLeadership');

                            LoadKeyBehavior(datas.AssesmentPositionID, 'tblKeyBehaviourResource', 'tblKeyBehaviourResourceDevelopment', 'tblKeyBehaviourResourceMetode', 'tblKeyBehaviourResourceSuporting', 'tblKeyBehaviourResourceStartDate', 'tblKeyBehaviourResourceEndDate', 'RESOURCE','tblLevelResource');

                        },
                        error: function () {
                            alert('Error load data NIK!');
                        }
                    });
                }
            });

            $("#btnSave").click(function () {

                var NIK = $("#<%=ddlNIK.ClientID %>").val();
                if (NIK == "") {
                    $.msgBox("NIK wajib di pilih !", null, { title: "Pesan" });
                    return;
                }

                ///GROUP CUSTOMER FOCUS

                var AssesmentPositionDtlIDCustomerFocus = "";
                $('#tblKeyBehaviourCustomerFocus tr').each(function () {
                    var row = $(this);
                    var isi = row.find('input[type="hidden"]').val();
                    AssesmentPositionDtlIDCustomerFocus += isi + "|"; ;
                });

                var DevelopmentCustomerFocus = "";
                $('#tblKeyBehaviourCustomerFocusDevelopment tr').each(function () {
                    var row = $(this);
                    //                    if
                    //                    (row.find('textarea').val().length <= 0) {
                    //                        //alert('Isi Development Customer Focus !');
                    //                        //return;
                    //                    }
                    //                    else {
                    var isi = row.find('textarea').val();
                    DevelopmentCustomerFocus = isi;
                    //                    }

                });

                var MetodeIDCustomerFocus = "";
                var listCustomerFocus = 1;
                $('#tblKeyBehaviourCustomerFocusMetode tr').each(function () {
                    MetodeIDCustomerFocus += $('#ddlMetode' + listCustomerFocus + ' option:selected').val() + "|";
                    listCustomerFocus++;

                });

                var SuportingCustomerFocus = "";
                $('#tblKeyBehaviourCustomerFocusSuporting tr').each(function () {
                    var row = $(this);
                    //                    if
                    //                    (row.find('input[type="text"]').val().length <= 0) {
                    //                        //alert('Isi Suporting Customer Focus !');
                    //                        //return;

                    //                    }
                    //                    else {
                    var isi = row.find('input[type="text"]').val();
                    SuportingCustomerFocus += isi + "|";
                    //                    }

                });

                var StartDateCustomerFocus = "";
                $('#tblKeyBehaviourCustomerFocusStartDate tr').each(function () {
                    var row = $(this);
                    //                    if
                    //                    (row.find('input[type="text"]').val().length <= 0) {
                    //                        //alert('Isi Start Date Customer Focus !');

                    //                    }
                    //                    else {
                    var isi = row.find('input[type="text"]').val();
                    StartDateCustomerFocus += isi + "|";
                    //                    }

                });

                var EndDateCustomerFocus = "";
                $('#tblKeyBehaviourCustomerFocusEndDate tr').each(function () {
                    var row = $(this);
                    //                    if
                    //                    (row.find('input[type="text"]').val().length <= 0) {
                    //                        //alert('Isi End Date Customer Focus !');

                    //                    }
                    //                    else {
                    var isi = row.find('input[type="text"]').val();
                    EndDateCustomerFocus += isi + "|";
                    //                    }

                });

                //END GROUP CUSTOMER FOCUS

                ///GROUP INTEGRITY

                var AssesmentPositionDtlIDIntegrity = "";
                $('#tblKeyBehaviourIntegrity tr').each(function () {
                    var row = $(this);
                    var isi = row.find('input[type="hidden"]').val();
                    AssesmentPositionDtlIDIntegrity += isi + "|"; ;
                });

                var DevelopmentIntegrity = "";
                $('#tblKeyBehaviourIntegrityDevelopment tr').each(function () {
                    var row = $(this);
                    //                    if
                    //                    (row.find('textarea').val().length <= 0) {
                    //                        //alert('Isi Development Integrity !');
                    //                    }
                    //                    else {
                    var isi = row.find('textarea').val();
                    DevelopmentIntegrity = isi;
                    //                    }

                });

                var MetodeIDIntegrity = "";
                var listIntegrity = 1;
                $('#tblKeyBehaviourIntegrityMetode tr').each(function () {
                    MetodeIDIntegrity += $('#ddlMetode' + listIntegrity + ' option:selected').val() + "|";
                    listIntegrity++;

                });

                var SuportingIntegrity = "";
                $('#tblKeyBehaviourIntegritySuporting tr').each(function () {
                    var row = $(this);
                    //                    if
                    //                    (row.find('input[type="text"]').val().length <= 0) {
                    //                        //alert('Isi Suporting Customer Focus !');

                    //                    }
                    //                    else {
                    var isi = row.find('input[type="text"]').val();
                    SuportingIntegrity += isi + "|";
                    //                    }

                });

                var StartDateIntegrity = "";
                $('#tblKeyBehaviourIntegrityStartDate tr').each(function () {
                    var row = $(this);
                    //                    if
                    //                    (row.find('input[type="text"]').val().length <= 0) {
                    //                        //alert('Isi Start Date Integrity !');

                    //                    }
                    //                    else {
                    var isi = row.find('input[type="text"]').val();
                    StartDateIntegrity += isi + "|";
                    //                    }

                });

                var EndDateIntegrity = "";
                $('#tblKeyBehaviourIntegrityEndDate tr').each(function () {
                    var row = $(this);
                    //                    if
                    //                    (row.find('input[type="text"]').val().length <= 0) {
                    //                        //alert('Isi End Date Integrity !');

                    //                    }
                    //                    else {
                    var isi = row.find('input[type="text"]').val();
                    EndDateIntegrity += isi + "|";
                    //                    }

                });

                //END GROUP INTEGRITY

                ///GROUP TEAM WORK

                var AssesmentPositionDtlIDTeamWork = "";
                $('#tblKeyBehaviourTeamWork tr').each(function () {
                    var row = $(this);
                    var isi = row.find('input[type="hidden"]').val();
                    AssesmentPositionDtlIDTeamWork += isi + "|"; ;
                });

                var DevelopmentTeamWork = "";
                $('#tblKeyBehaviourTeamWorkDevelopment tr').each(function () {
                    var row = $(this);
                    //                    if
                    //                    (row.find('textarea').val().length <= 0) {
                    //                        //alert('Isi Development TeamWork !');
                    //                    }
                    //                    else {
                    var isi = row.find('textarea').val();
                    DevelopmentTeamWork = isi;
                    //                    }

                });

                var MetodeIDTeamWork = "";
                var listTeamWork = 1;
                $('#tblKeyBehaviourTeamWorkMetode tr').each(function () {
                    MetodeIDTeamWork += $('#ddlMetode' + listTeamWork + ' option:selected').val() + "|";
                    listTeamWork++;

                });

                var SuportingTeamWork = "";
                $('#tblKeyBehaviourTeamWorkSuporting tr').each(function () {
                    var row = $(this);
                    //                    if
                    //                    (row.find('input[type="text"]').val().length <= 0) {
                    //                        //alert('Isi Suporting Customer Focus !');

                    //                    }
                    //                    else {
                    var isi = row.find('input[type="text"]').val();
                    SuportingTeamWork += isi + "|";
                    //                    }

                });

                var StartDateTeamWork = "";
                $('#tblKeyBehaviourTeamWorkStartDate tr').each(function () {
                    var row = $(this);
                    //                    if
                    //                    (row.find('input[type="text"]').val().length <= 0) {
                    //                        //alert('Isi Start Date TeamWork !');

                    //                    }
                    //                    else {
                    var isi = row.find('input[type="text"]').val();
                    StartDateTeamWork += isi + "|";
                    //                    }

                });

                var EndDateTeamWork = "";
                $('#tblKeyBehaviourTeamWorkEndDate tr').each(function () {
                    var row = $(this);
                    //                    if
                    //                    (row.find('input[type="text"]').val().length <= 0) {
                    //                        //alert('Isi End Date TeamWork !');

                    //                    }
                    //                    else {
                    var isi = row.find('input[type="text"]').val();
                    EndDateTeamWork += isi + "|";
                    //                    }

                });

                //END GROUP TEAM WORK

                ///GROUP CONTINOUS LEARNING

                var AssesmentPositionDtlIDContinous = "";
                $('#tblKeyBehaviourContinous tr').each(function () {
                    var row = $(this);
                    var isi = row.find('input[type="hidden"]').val();
                    AssesmentPositionDtlIDContinous += isi + "|"; ;
                });

                var DevelopmentContinous = "";
                $('#tblKeyBehaviourContinousDevelopment tr').each(function () {
                    var row = $(this);
                    //                    if
                    //                    (row.find('textarea').val().length <= 0) {
                    //                        //alert('Isi Development Continous !');
                    //                    }
                    //                    else {
                    var isi = row.find('textarea').val();
                    DevelopmentContinous = isi;
                    //                    }

                });

                var MetodeIDContinous = "";
                var listContinous = 1;
                $('#tblKeyBehaviourContinousMetode tr').each(function () {
                    MetodeIDContinous += $('#ddlMetode' + listContinous + ' option:selected').val() + "|";
                    listContinous++;

                });

                var SuportingContinous = "";
                $('#tblKeyBehaviourContinousSuporting tr').each(function () {
                    var row = $(this);
                    //                    if
                    //                    (row.find('input[type="text"]').val().length <= 0) {
                    //                        //alert('Isi Suporting Customer Focus !');

                    //                    }
                    //                    else {
                    var isi = row.find('input[type="text"]').val();
                    SuportingContinous += isi + "|";
                    //                    }

                });

                var StartDateContinous = "";
                $('#tblKeyBehaviourContinousStartDate tr').each(function () {
                    var row = $(this);
                    //                    if
                    //                    (row.find('input[type="text"]').val().length <= 0) {
                    //                        //alert('Isi Start Date Continous !');

                    //                    }
                    //                    else {
                    var isi = row.find('input[type="text"]').val();
                    StartDateContinous += isi + "|";
                    //                    }

                });

                var EndDateContinous = "";
                $('#tblKeyBehaviourContinousEndDate tr').each(function () {
                    var row = $(this);
                    //                    if
                    //                    (row.find('input[type="text"]').val().length <= 0) {
                    //                        //alert('Isi End Date Continous !');

                    //                    }
                    //                    else {
                    var isi = row.find('input[type="text"]').val();
                    EndDateContinous += isi + "|";
                    //                    }

                });

                //END GROUP CONTINOUS LEARNING

                ///GROUP WORK EXCELLENCE

                var AssesmentPositionDtlIDWorkExcellence = "";
                $('#tblKeyBehaviourWorkExcellence tr').each(function () {
                    var row = $(this);
                    var isi = row.find('input[type="hidden"]').val();
                    AssesmentPositionDtlIDWorkExcellence += isi + "|"; ;
                });

                var DevelopmentWorkExcellence = "";
                $('#tblKeyBehaviourWorkExcellenceDevelopment tr').each(function () {
                    var row = $(this);
                    //                    if
                    //                    (row.find('textarea').val().length <= 0) {
                    //                        //alert('Isi Development WorkExcellence !');
                    //                    }
                    //                    else {
                    var isi = row.find('textarea').val();
                    DevelopmentWorkExcellence = isi;
                    //                    }

                });

                var MetodeIDWorkExcellence = "";
                var listWorkExcellence = 1;
                $('#tblKeyBehaviourWorkExcellenceMetode tr').each(function () {
                    MetodeIDWorkExcellence += $('#ddlMetode' + listWorkExcellence + ' option:selected').val() + "|";
                    listWorkExcellence++;

                });

                var SuportingWorkExcellence = "";
                $('#tblKeyBehaviourWorkExcellenceSuporting tr').each(function () {
                    var row = $(this);
                    //                    if
                    //                    (row.find('input[type="text"]').val().length <= 0) {
                    //                        //alert('Isi Suporting Customer Focus !');

                    //                    }
                    //                    else {
                    var isi = row.find('input[type="text"]').val();
                    SuportingWorkExcellence += isi + "|";
                    //                    }

                });

                var StartDateWorkExcellence = "";
                $('#tblKeyBehaviourWorkExcellenceStartDate tr').each(function () {
                    var row = $(this);
                    //                    if
                    //                    (row.find('input[type="text"]').val().length <= 0) {
                    //                        //alert('Isi Start Date WorkExcellence !');

                    //                    }
                    //                    else {
                    var isi = row.find('input[type="text"]').val();
                    StartDateWorkExcellence += isi + "|";
                    //                    }

                });

                var EndDateWorkExcellence = "";
                $('#tblKeyBehaviourWorkExcellenceEndDate tr').each(function () {
                    var row = $(this);
                    //                    if
                    //                    (row.find('input[type="text"]').val().length <= 0) {
                    //                        //alert('Isi End Date WorkExcellence !');

                    //                    }
                    //                    else {
                    var isi = row.find('input[type="text"]').val();
                    EndDateWorkExcellence += isi + "|";
                    //                    }

                });

                //END GROUP WORK EXCELLENCE


                ///GROUP B. FINANCIAL ACCUMENT

                var AssesmentPositionDtlIDFinancial = "";
                $('#tblKeyBehaviourFinancial tr').each(function () {
                    var row = $(this);
                    var isi = row.find('input[type="hidden"]').val();
                    AssesmentPositionDtlIDFinancial += isi + "|"; ;
                });

                var DevelopmentFinancial = "";
                $('#tblKeyBehaviourFinancialDevelopment tr').each(function () {
                    var row = $(this);
                    //                    if
                    //                    (row.find('textarea').val().length <= 0) {
                    //                        //alert('Isi Development Financial !');
                    //                    }
                    //                    else {
                    var isi = row.find('textarea').val();
                    DevelopmentFinancial = isi;
                    //                    }

                });

                var MetodeIDFinancial = "";
                var listFinancial = 1;
                $('#tblKeyBehaviourFinancialMetode tr').each(function () {
                    MetodeIDFinancial += $('#ddlMetode' + listFinancial + ' option:selected').val() + "|";
                    listFinancial++;

                });

                var SuportingFinancial = "";
                $('#tblKeyBehaviourFinancialSuporting tr').each(function () {
                    var row = $(this);
                    //                    if
                    //                    (row.find('input[type="text"]').val().length <= 0) {
                    //                        //alert('Isi Suporting Customer Focus !');

                    //                    }
                    //                    else {
                    var isi = row.find('input[type="text"]').val();
                    SuportingFinancial += isi + "|";
                    //                    }

                });

                var StartDateFinancial = "";
                $('#tblKeyBehaviourFinancialStartDate tr').each(function () {
                    var row = $(this);
                    //                    if
                    //                    (row.find('input[type="text"]').val().length <= 0) {
                    //                        //alert('Isi Start Date Financial !');

                    //                    }
                    //                    else {
                    var isi = row.find('input[type="text"]').val();
                    StartDateFinancial += isi + "|";
                    //                    }

                });

                var EndDateFinancial = "";
                $('#tblKeyBehaviourFinancialEndDate tr').each(function () {
                    var row = $(this);
                    //                    if
                    //                    (row.find('input[type="text"]').val().length <= 0) {
                    //                        //alert('Isi End Date Financial !');

                    //                    }
                    //                    else {
                    var isi = row.find('input[type="text"]').val();
                    EndDateFinancial += isi + "|";
                    //                    }

                });

                //END GROUP B. FINANCIAL ACCUMENT

                ///GROUP B. BUSSINES PARTNERSHIP 

                var AssesmentPositionDtlIDBussines = "";
                $('#tblKeyBehaviourBussines tr').each(function () {
                    var row = $(this);
                    var isi = row.find('input[type="hidden"]').val();
                    AssesmentPositionDtlIDBussines += isi + "|"; ;
                });

                var DevelopmentBussines = "";
                $('#tblKeyBehaviourBussinesDevelopment tr').each(function () {
                    var row = $(this);
                    //                    if
                    //                    (row.find('textarea').val().length <= 0) {
                    //                        //alert('Isi Development Bussines !');
                    //                    }
                    //                    else {
                    var isi = row.find('textarea').val();
                    DevelopmentBussines = isi;
                    //                    }

                });

                var MetodeIDBussines = "";
                var listBussines = 1;
                $('#tblKeyBehaviourBussinesMetode tr').each(function () {
                    MetodeIDBussines += $('#ddlMetode' + listBussines + ' option:selected').val() + "|";
                    listBussines++;

                });

                var SuportingBussines = "";
                $('#tblKeyBehaviourBussinesSuporting tr').each(function () {
                    var row = $(this);
                    //                    if
                    //                    (row.find('input[type="text"]').val().length <= 0) {
                    //                        //alert('Isi Suporting Customer Focus !');

                    //                    }
                    //                    else {
                    var isi = row.find('input[type="text"]').val();
                    SuportingBussines += isi + "|";
                    //                    }

                });

                var StartDateBussines = "";
                $('#tblKeyBehaviourBussinesStartDate tr').each(function () {
                    var row = $(this);
                    //                    if
                    //                    (row.find('input[type="text"]').val().length <= 0) {
                    //                        //alert('Isi Start Date Bussines !');

                    //                    }
                    //                    else {
                    var isi = row.find('input[type="text"]').val();
                    StartDateBussines += isi + "|";
                    //                    }

                });

                var EndDateBussines = "";
                $('#tblKeyBehaviourBussinesEndDate tr').each(function () {
                    var row = $(this);
                    //                    if
                    //                    (row.find('input[type="text"]').val().length <= 0) {
                    //                        //alert('Isi End Date Bussines !');

                    //                    }
                    //                    else {
                    var isi = row.find('input[type="text"]').val();
                    EndDateBussines += isi + "|";
                    //                    }

                });

                //END GROUP B. FINANCIAL ACCUMENT

                ///GROUP LEADERSHIP

                var AssesmentPositionDtlIDLeadership = "";
                $('#tblKeyBehaviourLeadership tr').each(function () {
                    var row = $(this);
                    var isi = row.find('input[type="hidden"]').val();
                    AssesmentPositionDtlIDLeadership += isi + "|"; ;
                });

                var DevelopmentLeadership = "";
                $('#tblKeyBehaviourLeadershipDevelopment tr').each(function () {
                    var row = $(this);
                    //                    if
                    //                    (row.find('textarea').val().length <= 0) {
                    //                        //alert('Isi Development Leadership !');
                    //                    }
                    //                    else {
                    var isi = row.find('textarea').val();
                    DevelopmentLeadership = isi;
                    //                    }

                });

                var MetodeIDLeadership = "";
                var listLeadership = 1;
                $('#tblKeyBehaviourLeadershipMetode tr').each(function () {
                    MetodeIDLeadership += $('#ddlMetode' + listLeadership + ' option:selected').val() + "|";
                    listLeadership++;

                });

                var SuportingLeadership = "";
                $('#tblKeyBehaviourLeadershipSuporting tr').each(function () {
                    var row = $(this);
                    //                    if
                    //                    (row.find('input[type="text"]').val().length <= 0) {
                    //                        //alert('Isi Suporting Customer Focus !');

                    //                    }
                    //                    else {
                    var isi = row.find('input[type="text"]').val();
                    SuportingLeadership += isi + "|";
                    //                    }

                });

                var StartDateLeadership = "";
                $('#tblKeyBehaviourLeadershipStartDate tr').each(function () {
                    var row = $(this);
                    //                    if
                    //                    (row.find('input[type="text"]').val().length <= 0) {
                    //                        //alert('Isi Start Date Leadership !');

                    //                    }
                    //                    else {
                    var isi = row.find('input[type="text"]').val();
                    StartDateLeadership += isi + "|";
                    //                    }

                });

                var EndDateLeadership = "";
                $('#tblKeyBehaviourLeadershipEndDate tr').each(function () {
                    var row = $(this);
                    //                    if
                    //                    (row.find('input[type="text"]').val().length <= 0) {
                    //                        //alert('Isi End Date Leadership !');

                    //                    }
                    //                    else {
                    var isi = row.find('input[type="text"]').val();
                    EndDateLeadership += isi + "|";
                    //                    }

                });

                //END GROUP LEADERSHIP


                ///GROUP RESOURCE

                var AssesmentPositionDtlIDResource = "";
                $('#tblKeyBehaviourResource tr').each(function () {
                    var row = $(this);
                    var isi = row.find('input[type="hidden"]').val();
                    AssesmentPositionDtlIDResource += isi + "|"; ;
                });

                var DevelopmentResource = "";
                $('#tblKeyBehaviourResourceDevelopment tr').each(function () {
                    var row = $(this);
                    //                    if
                    //                    (row.find('textarea').val().length <= 0) {
                    //                        //alert('Isi Development Resource !');
                    //                    }
                    //                    else {
                    var isi = row.find('textarea').val();
                    DevelopmentResource = isi;
                    //                    }

                });

                var MetodeIDResource = "";
                var listResource = 1;
                $('#tblKeyBehaviourResourceMetode tr').each(function () {
                    MetodeIDResource += $('#ddlMetode' + listResource + ' option:selected').val() + "|";
                    listResource++;

                });

                var SuportingResource = "";
                $('#tblKeyBehaviourResourceSuporting tr').each(function () {
                    var row = $(this);
                    //                    if
                    //                    (row.find('input[type="text"]').val().length <= 0) {
                    //                        //alert('Isi Suporting Customer Focus !');

                    //                    }
                    //                    else {
                    var isi = row.find('input[type="text"]').val();
                    SuportingResource += isi + "|";
                    //                    }

                });

                var StartDateResource = "";
                $('#tblKeyBehaviourResourceStartDate tr').each(function () {
                    var row = $(this);
                    //                    if
                    //                    (row.find('input[type="text"]').val().length <= 0) {
                    //                        //alert('Isi Start Date Resource !');

                    //                    }
                    //                    else {
                    var isi = row.find('input[type="text"]').val();
                    StartDateResource += isi + "|";
                    //                    }

                });

                var EndDateResource = "";
                $('#tblKeyBehaviourResourceEndDate tr').each(function () {
                    var row = $(this);
                    //                    if
                    //                    (row.find('input[type="text"]').val().length <= 0) {
                    //                        //alert('Isi End Date Resource !');

                    //                    }
                    //                    else {
                    var isi = row.find('input[type="text"]').val();
                    EndDateResource += isi + "|";
                    //                    }

                });

                //END GROUP B. FINANCIAL ACCUMENT







                var NIK = $('#<%= ddlNIK.ClientID %> option:selected').val();
                var departemen = $('#<%= ddlDepartemen.ClientID %> option:selected').val();
                var jabatan = $('#<%= ddlJabatanTujuan.ClientID %> option:selected').val();
                var id = $('#<%= hfID.ClientID %>').val();
                var tglAsessment = $('#<%= txtTglAssesment.ClientID %>').val();

                var objAssesmentPositionIDP = new Object();
                objAssesmentPositionIDP.AssesmentIdpID = id;
                objAssesmentPositionIDP.AssesmentPositionID = NIK;


                ///GROUP CUSTOMER FOCUS
                objAssesmentPositionIDP.AssesmentPositionDtlIDCustomerFocus = encodeURIComponent(AssesmentPositionDtlIDCustomerFocus);
                objAssesmentPositionIDP.DevelopmentActivityCustomerFocus = encodeURIComponent(DevelopmentCustomerFocus);
                objAssesmentPositionIDP.MethodIDCustomerFocus = encodeURIComponent(MetodeIDCustomerFocus);
                objAssesmentPositionIDP.SupportingPeopleCustomerFocus = encodeURIComponent(SuportingCustomerFocus);
                objAssesmentPositionIDP.StartDateCustomerFocus = encodeURIComponent(StartDateCustomerFocus);
                objAssesmentPositionIDP.EndDateCustomerFocus = encodeURIComponent(EndDateCustomerFocus);
                //END GROUP CUSTOMER FOCUS



                ///GROUP INTEGRITY
                objAssesmentPositionIDP.AssesmentPositionDtlIDIntegrity = encodeURIComponent(AssesmentPositionDtlIDIntegrity);
                objAssesmentPositionIDP.DevelopmentActivityIntegrity = encodeURIComponent(DevelopmentIntegrity);
                objAssesmentPositionIDP.MethodIDIntegrity = encodeURIComponent(MetodeIDIntegrity);
                objAssesmentPositionIDP.SupportingPeopleIntegrity = encodeURIComponent(SuportingIntegrity);
                objAssesmentPositionIDP.StartDateIntegrity = encodeURIComponent(StartDateIntegrity);
                objAssesmentPositionIDP.EndDateIntegrity = encodeURIComponent(EndDateIntegrity);
                //END GROUP INTEGRITY

                ///GROUP TEAM WORK
                objAssesmentPositionIDP.AssesmentPositionDtlIDTeamWork = encodeURIComponent(AssesmentPositionDtlIDTeamWork);
                objAssesmentPositionIDP.DevelopmentActivityTeamWork = encodeURIComponent(DevelopmentTeamWork);
                objAssesmentPositionIDP.MethodIDTeamWork = encodeURIComponent(MetodeIDTeamWork);
                objAssesmentPositionIDP.SupportingPeopleTeamWork = encodeURIComponent(SuportingTeamWork);
                objAssesmentPositionIDP.StartDateTeamWork = encodeURIComponent(StartDateTeamWork);
                objAssesmentPositionIDP.EndDateTeamWork = encodeURIComponent(EndDateTeamWork);
                //END GROUP TEAM WORK

                ///GROUP CONTINOUS LEARNING
                objAssesmentPositionIDP.AssesmentPositionDtlIDContinous = encodeURIComponent(AssesmentPositionDtlIDContinous);
                objAssesmentPositionIDP.DevelopmentActivityContinous = encodeURIComponent(DevelopmentContinous);
                objAssesmentPositionIDP.MethodIDContinous = encodeURIComponent(MetodeIDContinous);
                objAssesmentPositionIDP.SupportingPeopleContinous = encodeURIComponent(SuportingContinous);
                objAssesmentPositionIDP.StartDateContinous = encodeURIComponent(StartDateContinous);
                objAssesmentPositionIDP.EndDateContinous = encodeURIComponent(EndDateContinous);
                //END GROUP CONTINOUS LEARNING


                ///GROUP WORK EXCELLENCE
                objAssesmentPositionIDP.AssesmentPositionDtlIDWorkExcellence = encodeURIComponent(AssesmentPositionDtlIDWorkExcellence);
                objAssesmentPositionIDP.DevelopmentActivityWorkExcellence = encodeURIComponent(DevelopmentWorkExcellence);
                objAssesmentPositionIDP.MethodIDWorkExcellence = encodeURIComponent(MetodeIDWorkExcellence);
                objAssesmentPositionIDP.SupportingPeopleWorkExcellence = encodeURIComponent(SuportingWorkExcellence);
                objAssesmentPositionIDP.StartDateWorkExcellence = encodeURIComponent(StartDateWorkExcellence);
                objAssesmentPositionIDP.EndDateWorkExcellence = encodeURIComponent(EndDateWorkExcellence);
                //END GROUP WORK EXCELLENCE

                ///GROUP B. FINANCIAL ACCUMENT
                objAssesmentPositionIDP.AssesmentPositionDtlIDFinancial = encodeURIComponent(AssesmentPositionDtlIDFinancial);
                objAssesmentPositionIDP.DevelopmentActivityFinancial = encodeURIComponent(DevelopmentFinancial);
                objAssesmentPositionIDP.MethodIDFinancial = encodeURIComponent(MetodeIDFinancial);
                objAssesmentPositionIDP.SupportingPeopleFinancial = encodeURIComponent(SuportingFinancial);
                objAssesmentPositionIDP.StartDateFinancial = encodeURIComponent(StartDateFinancial);
                objAssesmentPositionIDP.EndDateFinancial = encodeURIComponent(EndDateFinancial);
                //END GROUP  B. FINANCIAL ACCUMENT


                ///GROUP B. BUSSINES PARTNERSHIP 
                objAssesmentPositionIDP.AssesmentPositionDtlIDBussines = encodeURIComponent(AssesmentPositionDtlIDBussines);
                objAssesmentPositionIDP.DevelopmentActivityBussines = encodeURIComponent(DevelopmentBussines);
                objAssesmentPositionIDP.MethodIDBussines = encodeURIComponent(MetodeIDBussines);
                objAssesmentPositionIDP.SupportingPeopleBussines = encodeURIComponent(SuportingBussines);
                objAssesmentPositionIDP.StartDateBussines = encodeURIComponent(StartDateBussines);
                objAssesmentPositionIDP.EndDateBussines = encodeURIComponent(EndDateBussines);
                //END GROUP B. BUSSINES PARTNERSHIP 


                ///GROUP LEADERSHIP
                objAssesmentPositionIDP.AssesmentPositionDtlIDLeadership = encodeURIComponent(AssesmentPositionDtlIDLeadership);
                objAssesmentPositionIDP.DevelopmentActivityLeadership = encodeURIComponent(DevelopmentLeadership);
                objAssesmentPositionIDP.MethodIDLeadership = encodeURIComponent(MetodeIDLeadership);
                objAssesmentPositionIDP.SupportingPeopleLeadership = encodeURIComponent(SuportingLeadership);
                objAssesmentPositionIDP.StartDateLeadership = encodeURIComponent(StartDateLeadership);
                objAssesmentPositionIDP.EndDateLeadership = encodeURIComponent(EndDateLeadership);
                //END GROUP LEADERSHIP


                ///GROUP RESOURCE
                objAssesmentPositionIDP.AssesmentPositionDtlIDResource = encodeURIComponent(AssesmentPositionDtlIDResource);
                objAssesmentPositionIDP.DevelopmentActivityResource = encodeURIComponent(DevelopmentResource);
                objAssesmentPositionIDP.MethodIDResource = encodeURIComponent(MetodeIDResource);
                objAssesmentPositionIDP.SupportingPeopleResource = encodeURIComponent(SuportingResource);
                objAssesmentPositionIDP.StartDateResource = encodeURIComponent(StartDateResource);
                objAssesmentPositionIDP.EndDateResource = encodeURIComponent(EndDateResource);
                //END GROUP LEADERSHIP



                jsonData = JSON.stringify(objAssesmentPositionIDP);
                var handlerUrl = '<%= ResolveUrl("~/ajaxhandler/Transaction/AssesmentPositionIDPHandler.ashx") %>';
                if (id == 0) {

                    $.ajax({
                        type: 'POST',
                        url: handlerUrl + '?method=insert',
                        contentType: 'application/json',
                        dataType: 'json',
                        data: jsonData,
                        success: function (data) {
                            if (data.IsSuccess) {
                                //alert(data.Message);

                                $.msgBox(data.Message, null, { title: "Pesan" });

                                var page = '<%= ResolveUrl("~/lists/Transaction/AssesmentPositionIDPList.aspx") %>' + '?menuId=' + '<%= base.MenuID %>';
                                window.location.href = page;

                            }
                            else {
                                //alert(data.Message);

                                $.msgBox(data.Message, null, { title: "Pesan" });
                            }
                        },
                        error: function (response) {
                            var r = JSON.parse(response.responseText);
                            alert("Error Message: " + r.Message);
                        }
                    });

                }
                else {

                    $.ajax({
                        type: 'POST',
                        url: handlerUrl + '?method=update',
                        contentType: 'application/json',
                        dataType: 'json',
                        data: jsonData,
                        success: function (data) {
                            if (data.IsSuccess) {

                                $.msgBox(data.Message, null, { title: "Pesan" });
                                var page = '<%= ResolveUrl("~/lists/Transaction/AssesmentPositionIDPList.aspx") %>' + '?menuId=' + '<%= base.MenuID %>';
                                window.location.href = page;

                            }
                            else {

                                $.msgBox(data.Message, null, { title: "Pesan" });
                            }
                        },
                        error: function (response) {
                            var r = JSON.parse(response.responseText);
                            alert("Error Message: " + r.Message);
                        }
                    });
                }




            });


        });




        function LoadKeyBehavior(AssesmentPositionID, tableDetail, tableDevelopment, tableMetode, tableSuporting, tableStartDate, tableEndDate, CompetencyDesc, tableLevel) {

            var handlerUrl = '<%= ResolveUrl("~/AjaxHandler/Loaddata/Transaction/AssesmentPositionDetailLoad.ashx") %>';
            if (AssesmentPositionID != "") {
                $.ajax({
                    type: 'POST',
                    url: handlerUrl + "?method=getbyAssesmentPositionID_CompetencyDesc_False&AssesmentPositionID=" + AssesmentPositionID + "&CompetencyDesc=" + CompetencyDesc,
                    contentType: 'application/json',
                    dataType: 'json',
                    success: function (datas) {
                        var html = "";
                        var No = 1;
                        var NoList = 1;
                        var rating = "";
                        var Level = "";
                        $.each(datas, function (i, data) {

                            html = "<tr><td> <input type='hidden' id='AssesmentPositionDtlID" + No + "' value='" + data.AssesmentPositionDtlID + "' />" + No + ".</td><td>" + data.KeyBehaviourDetail.KeyBehaviourName + "</td></tr>";
                            $("#" + tableDetail).append(html)

                            //LOAD METHOD DEVELOPMENT
                            $.ajax({
                                type: 'POST',
                                url: '<%= ResolveUrl("~/AjaxHandler/Loaddata/Administration/catalog/MethodDevelopmentLoad.ashx") %>' + "?method=getAllData",
                                contentType: 'application/json',
                                dataType: 'json',
                                success: function (datasMethod) {


                                    html = " <tr><td> <select id='ddlMetode" + NoList + "' name='ddlMetode" + NoList + "' style='width:200px;'>";
                                    $.each(datasMethod, function (i, dataMethod) {
                                        html = html + " <option value=" + dataMethod.MethodID + ">" + dataMethod.MethodName + "</option>";
                                    });

                                    html = html + "</select></td></tr>";

                                    $("#" + tableMetode).append(html)
                                    NoList++;
                                },
                                error: function () {
                                    alert('Error load method development!');
                                }
                            });

                            //END 



                            //                                html = "<tr><td>" + "<textarea rows='3' cols='30' id='txtDevelopment' name='txtDevelopment'></textarea>" + "</td></tr>";
                            //                                $("#" + tableDevelopment).append(html)

                            html = "<tr><td>" + "<input type='text' id='txtSuporting" + No + "' name='txtSuporting" + No + "' />" + "</td></tr>";
                            $("#" + tableSuporting).append(html)

                            html = "<tr><td>" + "<input type='text' id='txtTglStartDate" + No + "' name='txtTglStartDate" + No + "' />" + "</td></tr>";
                            $("#" + tableStartDate).append(html)

                            html = "<tr><td>" + "<input type='text' id='txtTglEndDate" + No + "' name='txtTglEndDate" + No + "' />" + "</td></tr>";
                            $("#" + tableEndDate).append(html)

                            Level = data.KeyBehaviourDetail.LevelCompetency.Level;
                            No++;

                        });

                        if (datas != "") {
                            html = "<tr><td>" + "<textarea rows='3' cols='30' id='txtDevelopment' name='txtDevelopment'></textarea>" + "</td></tr>";
                            $("#" + tableDevelopment).append(html)

                            html = "<tr><td>" + Level + "</td></tr>";
                            $("#" + tableLevel).append(html)

                            //                            html = "<tr><td>" + "<input type='text' id='txtMetode' name='txtMetode' />" + "</td></tr>";
                            //                            $("#" + tableSuporting).append(html)

                            //                            html = "<tr><td>" + "<input type='text' id='txtTglStartDate' name='txtTglStartDate' />" + "</td></tr>";
                            //                            $("#" + tableStartDate).append(html)

                            //                            html = "<tr><td>" + "<input type='text' id='txtTglEndDate' name='txtTglEndDate' />" + "</td></tr>";
                            //                            $("#" + tableEndDate).append(html)
                        }

                    },
                    error: function () {
                        alert('Error load generete keybehaviour!');
                    }
                });
            }

        }

        function LoadKeyBehaviorEdit(AssesmentIdpID, tableDetail, tableDevelopment, tableMetode, tableSuporting, tableStartDate, tableEndDate, CompetencyDesc, tableLevel) {

            var handlerUrl = '<%= ResolveUrl("~/AjaxHandler/Loaddata/Transaction/AssesmentPositionIdpDetailLoad.ashx") %>';
            if (AssesmentIdpID != "") {
                $.ajax({
                    type: 'POST',
                    url: handlerUrl + "?method=getbyAssesmentIdpID_CompetencyDesc&AssesmentIdpID=" + AssesmentIdpID + "&CompetencyDesc=" + CompetencyDesc,
                    contentType: 'application/json',
                    dataType: 'json',
                    success: function (datas) {
                        var html = "";
                        var No = 1;
                        var NoList = 1;
                        var DevelopmentActivity = "";
                        var SupportingPeople = "";
                        var StartDate = "";
                        var EndDate = "";
                        var Level = "";
                        $.each(datas, function (i, data) {

                            html = "<tr><td> <input type='hidden' id='AssesmentPositionDtlID" + No + "' value='" + data.AssesmentPositionDtlID + "' />" + No + ".</td><td>" + data.AssesmentPositionDetail.KeyBehaviourDetail.KeyBehaviourName + "</td></tr>";
                            $("#" + tableDetail).append(html)

                            DevelopmentActivity = data.DevelopmentActivity;
                            SupportingPeople = data.SupportingPeople;
                            StartDate = data.StartDate;
                            EndDate = data.EndDate;

                            //LOAD METHOD DEVELOPMENT
                            $.ajax({
                                type: 'POST',
                                url: '<%= ResolveUrl("~/AjaxHandler/Loaddata/Administration/catalog/MethodDevelopmentLoad.ashx") %>' + "?method=getAllData",
                                contentType: 'application/json',
                                dataType: 'json',
                                success: function (datasMethod) {


                                    html = " <tr><td> <select id='ddlMetode" + NoList + "' name='ddlMetode" + NoList + "' style='width:200px;'>";
                                    $.each(datasMethod, function (i, dataMethod) {
                                        html = html + " <option value=" + dataMethod.MethodID + ">" + dataMethod.MethodName + "</option>";
                                    });

                                    html = html + "</select></td></tr>";

                                    $("#" + tableMetode).append(html)
                                    NoList++;
                                },
                                error: function () {
                                    alert('Error load method development!');
                                }
                            });


                            //END 

                            html = "<tr><td>" + "<input type='text' id='txtSuporting" + No + "' name='txtSuporting" + No + "' value='" + SupportingPeople + "' />" + "</td></tr>";
                            $("#" + tableSuporting).append(html)

                            html = "<tr><td>" + "<input type='text' id='txtTglStartDate" + No + "' name='txtTglStartDate" + No + "' value='" + StartDate + "' />" + "</td></tr>";
                            $("#" + tableStartDate).append(html)

                            html = "<tr><td>" + "<input type='text' id='txtTglEndDate" + No + "' name='txtTglEndDate" + No + "' value='" + EndDate + "' />" + "</td></tr>";
                            $("#" + tableEndDate).append(html)

                            Level = data.AssesmentPositionDetail.KeyBehaviourDetail.LevelCompetency.Level;
                            No++;

                        });

                        if (datas != "") {
                            html = "<tr><td>" + "<textarea rows='3' cols='30' id='txtDevelopment' name='txtDevelopment'>" + DevelopmentActivity + "</textarea>" + "</td></tr>";
                            $("#" + tableDevelopment).append(html)

                            html = "<tr><td>" + Level + "</td></tr>";
                            $("#" + tableLevel).append(html)

                            //                            html = "<tr><td>" + "<input type='text' id='txtMetode' name='txtMetode' value='" + SupportingPeople + "' />" + "</td></tr>";
                            //                            $("#" + tableSuporting).append(html)

                            //                            html = "<tr><td>" + "<input type='text' id='txtTglStartDate' name='txtTglStartDate' value='"+StartDate+"' />" + "</td></tr>";
                            //                            $("#" + tableStartDate).append(html)

                            //                            html = "<tr><td>" + "<input type='text' id='txtTglEndDate' name='txtTglEndDate' value='"+EndDate+"' />" + "</td></tr>";
                            //                            $("#" + tableEndDate).append(html)


                        }

                    },
                    error: function () {
                        alert('Error load generete edit keybehaviour!');
                    }
                });
            }

        }

        function RemoverTrTable() {


            $("#tblKeyBehaviourCustomerFocus tr").remove();
            $("#tblKeyBehaviourCustomerFocusDevelopment tr").remove();
            $("#tblKeyBehaviourCustomerFocusMetode tr").remove();
            $("#tblKeyBehaviourCustomerFocusSuporting tr").remove();
            $("#tblKeyBehaviourCustomerFocusStartDate tr").remove();
            $("#tblKeyBehaviourCustomerFocusEndDate tr").remove();

            $("#tblKeyBehaviourIntegrity tr").remove();
            $("#tblKeyBehaviourIntegrityDevelopment tr").remove();
            $("#tblKeyBehaviourIntegrityMetode tr").remove();
            $("#tblKeyBehaviourIntegritySuporting tr").remove();
            $("#tblKeyBehaviourIntegrityStartDate tr").remove();
            $("#tblKeyBehaviourIntegrityEndDate tr").remove();

            $("#tblKeyBehaviourTeamWork tr").remove();
            $("#tblKeyBehaviourTeamWorkDevelopment tr").remove();
            $("#tblKeyBehaviourTeamWorkMetode tr").remove();
            $("#tblKeyBehaviourTeamWorkSuporting tr").remove();
            $("#tblKeyBehaviourTeamWorkStartDate tr").remove();
            $("#tblKeyBehaviourTeamWorkEndDate tr").remove();

            $("#tblKeyBehaviourContinous tr").remove();
            $("#tblKeyBehaviourContinousDevelopment tr").remove();
            $("#tblKeyBehaviourContinousMetode tr").remove();
            $("#tblKeyBehaviourContinousSuporting tr").remove();
            $("#tblKeyBehaviourContinousStartDate tr").remove();
            $("#tblKeyBehaviourContinousEndDate tr").remove();

            $("#tblKeyBehaviourWorkExcellence tr").remove();
            $("#tblKeyBehaviourWorkExcellenceDevelopment tr").remove();
            $("#tblKeyBehaviourWorkExcellenceMetode tr").remove();
            $("#tblKeyBehaviourWorkExcellenceSuporting tr").remove();
            $("#tblKeyBehaviourWorkExcellenceStartDate tr").remove();
            $("#tblKeyBehaviourWorkExcellenceEndDate tr").remove();

            $("#tblKeyBehaviourFinancial tr").remove();
            $("#tblKeyBehaviourFinancialDevelopment tr").remove();
            $("#tblKeyBehaviourFinancialMetode tr").remove();
            $("#tblKeyBehaviourFinancialSuporting tr").remove();
            $("#tblKeyBehaviourFinancialStartDate tr").remove();
            $("#tblKeyBehaviourFinancialEndDate tr").remove();

            $("#tblKeyBehaviourBussines tr").remove();
            $("#tblKeyBehaviourBussinesDevelopment tr").remove();
            $("#tblKeyBehaviourBussinesMetode tr").remove();
            $("#tblKeyBehaviourBussinesSuporting tr").remove();
            $("#tblKeyBehaviourBussinesStartDate tr").remove();
            $("#tblKeyBehaviourBussinesEndDate tr").remove();

            $("#tblKeyBehaviourLeadership tr").remove();
            $("#tblKeyBehaviourLeadershipDevelopment tr").remove();
            $("#tblKeyBehaviourLeadershipMetode tr").remove();
            $("#tblKeyBehaviourLeadershipSuporting tr").remove();
            $("#tblKeyBehaviourLeadershipStartDate tr").remove();
            $("#tblKeyBehaviourLeadershipEndDate tr").remove();

            $("#tblKeyBehaviourResource tr").remove();
            $("#tblKeyBehaviourResourceDevelopment tr").remove();
            $("#tblKeyBehaviourResourceMetode tr").remove();
            $("#tblKeyBehaviourResourceSuporting tr").remove();
            $("#tblKeyBehaviourResourceStartDate tr").remove();
            $("#tblKeyBehaviourResoureEndDate tr").remove();


            $("#tblLevelCustomerFocus tr").remove();
            $("#tblLevelIntegrity tr").remove();
            $("#tblLevelTeamWork tr").remove();
            $("#tblLevelContinous tr").remove();
            $("#tblLevelWorkExcellence tr").remove();
            $("#tblLevelFinancial tr").remove();
            $("#tblLevelBussines tr").remove();
            $("#tblLevelLeadership tr").remove();
            $("#tblLevelResource tr").remove();


        }
    </script>
    <div class="side-content fr">
        <div class="content-module">
            <div class="content-module-heading cf">
                <h3 class="fl">
                    Assesment Jabatan IDP</h3>
                <span class="fr expand-collapse-text">Click to collapse</span> <span class="fr expand-collapse-text initial-expand">
                    Click to expand</span>
            </div>
            <!-- end content-module-heading -->
            <table border="0" style="padding-left: 20px">
                <tr>
                    <td>
                        NIK
                    </td>
                    <td>
                        :
                    </td>
                    <td>
                        <table border="0">
                            <tr>
                                <td>
                                    <asp:DropDownList ID="ddlNIK" runat="server" Width="300">
                                    </asp:DropDownList>
                                </td>
                                <td>
                                    &nbsp;&nbsp;Tgl Assesment&nbsp;&nbsp;&nbsp;
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:TextBox ID="txtTglAssesment" ReadOnly="true" runat="server" Width="100"></asp:TextBox>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td>
                        Nama
                    </td>
                    <td>
                        :
                    </td>
                    <td>
                        <table border="0">
                            <tr>
                                <td>
                                    <asp:TextBox ID="txtNama" ReadOnly="true" runat="server" Width="300px"></asp:TextBox>
                                </td>
                                <td>
                                    &nbsp;Departemen &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:TextBox ID="txtDepartemen" ReadOnly="true" runat="server" Width="300px"></asp:TextBox>
                                    <asp:DropDownList Visible="false" ID="ddlDepartemen" runat="server" Width="400">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td>
                        Jabatan Saat ini
                    </td>
                    <td>
                        :
                    </td>
                    <td>
                        <table border="0">
                            <tr>
                                <td>
                                    <asp:TextBox ID="txtJabatan" ReadOnly="true" runat="server" Width="300px"></asp:TextBox>
                                </td>
                                <td>
                                    &nbsp;Lokasi &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:TextBox ID="txtLokasi" ReadOnly="true" runat="server" Width="300px"></asp:TextBox>
                                    <asp:DropDownList Visible="false" ID="ddlLokasi" runat="server" Width="300">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td>
                        Lokasi Kerja
                    </td>
                    <td>
                        :
                    </td>
                    <td>
                        <table border="0">
                            <tr>
                                <td>
                                    <asp:TextBox ID="txtLokasiKerja" ReadOnly="true" runat="server" Width="300px"></asp:TextBox>
                                </td>
                                <td>
                                    &nbsp;Jabatan Tujuan&nbsp;&nbsp;
                                </td>
                                <td>
                                    :
                                </td>
                                <td>
                                    <asp:TextBox ID="txtJabatanTujuan" ReadOnly="true" runat="server" Width="300px"></asp:TextBox>
                                    <asp:DropDownList Visible="false" ID="ddlJabatanTujuan" runat="server" Width="400">
                                    </asp:DropDownList>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td>
                        Tgl Join
                    </td>
                    <td>
                        :
                    </td>
                    <td>
                        <asp:TextBox ID="txtTglJoin" ReadOnly="true" runat="server" Width="300px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        Masa Kerja
                    </td>
                    <td>
                        :
                    </td>
                    <td>
                        <asp:TextBox ID="txtMasaKerja" ReadOnly="true" runat="server" Width="300px"></asp:TextBox>
                    </td>
                </tr>
            </table>
            <br />
            <br />
            <div style="width: 1150px; overflow: auto">
                <table class="gridtable" style="padding-left: 20px;" id="tbl1" border="1" cellpadding="0"
                    cellspacing="0" width="1500px">
                    <tr>
                        <th align="center" style="width: 150px;">
                            KOMPETENSI
                        </th>
                        <th align="center" style="width: 50px;">
                            LEVEL
                        </th>
                        <th align="center" style="width: 400px;">
                            KEY BEHAVIOUR
                        </th>
                        <th align="center" style="width: 100px;">
                            DEVELOPMENT ACTIVITY
                        </th>
                        <th align="center" style="width: 100px;">
                            METODE DEVELOPMENT
                        </th>
                        <th align="center" style="width: 100px;">
                            SUPORTING PEOPLE
                        </th>
                        <th align="center" style="width: 100px;">
                            START DATE
                        </th>
                        <th align="center" style="width: 100px;">
                            END DATE
                        </th>
                    </tr>
                    <tr>
                        <td>
                            CUSTOMER FOCUS
                        </td>
                        <td>
                            <table id="tblLevelCustomerFocus">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourCustomerFocus">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourCustomerFocusDevelopment">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourCustomerFocusMetode">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourCustomerFocusSuporting">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourCustomerFocusStartDate">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourCustomerFocusEndDate">
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            INTEGRITY
                        </td>
                        <td>
                            <table id="tblLevelIntegrity">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourIntegrity">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourIntegrityDevelopment">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourIntegrityMetode">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourIntegritySuporting">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourIntegrityStartDate">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourIntegrityEndDate">
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            TEAM WORK
                        </td>
                        <td>
                            <table id="tblLevelTeamWork">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourTeamWork">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourTeamWorkDevelopment">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourTeamWorkMetode">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourTeamWorkSuporting">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourTeamWorkStartDate">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourTeamWorkEndDate">
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            CONTINOUS LEARNING
                        </td>
                        <td>
                            <table id="tblLevelContinous">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourContinous">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourContinousDevelopment">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourContinousMetode">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourContinousSuporting">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourContinousStartDate">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourContinousEndDate">
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            WORK EXCELLENCE
                        </td>
                        <td>
                            <table id="tblLevelWorkExcellence">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourWorkExcellence">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourWorkExcellenceDevelopment">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourWorkExcellenceMetode">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourWorkExcellenceSuporting">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourWorkExcellenceStartDate">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourWorkExcellenceEndDate">
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            B. FINANCIAL ACCUMENT
                        </td>
                        <td>
                            <table id="tblLevelFinancial">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourFinancial">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourFinancialDevelopment">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourFinancialMetode">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourFinancialSuporting">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourFinancialStartDate">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourFinancialEndDate">
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            B. BUSSINES PARTNERSHIP
                        </td>
                        <td>
                            <table id="tblLevelBussines">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourBussines">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourBussinesDevelopment">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourBussinesMetode">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourBussinesSuporting">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourBussinesStartDate">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourBussinesEndDate">
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            LEADERSHIP
                        </td>
                        <td>
                            <table id="tblLevelLeadership">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourLeadership">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourLeadershipDevelopment">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourLeadershipMetode">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourLeadershipSuporting">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourLeadershipStartDate">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourLeadershipEndDate">
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            RESOURCE MANAGEMENT
                        </td>
                        <td>
                            <table id="tblLevelResource">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourResource">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourResourceDevelopment">
                            </table>
                        </td>
                        <td>
                            <table id="tblKeyBehaviourResourceMetode">
                            </table>
                            <td>
                                <table id="tblKeyBehaviourResourceSuporting">
                                </table>
                            </td>
                            <td>
                                <table id="tblKeyBehaviourResourceStartDate">
                                </table>
                            </td>
                            <td>
                                <table id="tblKeyBehaviourResourceEndDate">
                                </table>
                            </td>
                        </td>
                    </tr>
                    <asp:HiddenField ID="hfID" runat="server" />
                </table>
            </div>
            <div>
                <div style="text-align: right; padding-top: 10px;">
                    <button id="btnSave" type="button">
                        Save</button>
                    <button id="btnClose" type="button">
                        Back</button>
                </div>
            </div>
            <!-- end content-module-main -->
        </div>
    </div>
</asp:Content>
